package com.yunxi.core.util;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Created by xuruzi on 16/8/6.
 */
@Component
public class FileConst {
    @Value("${file.savePath}")
    private String savePath;
    @Value("${file.readPath}")
    private String readPath;
    @Value("${file.filePattern}")
    private String filePattern;
    @Value("${file.activityDir}")
    private String activityDir;
    @Value("${file.activitiImg}")
    private String activitiImg;


    private static FileConst fileConst;

    @PostConstruct
    public void init(){
        fileConst = this;
    }

    public static String getSavePath() {
        return fileConst.savePath;
    }

    public static String getReadPath() {
        return fileConst.readPath;
    }


    public static String getFilePattern() {
        return fileConst.filePattern;
    }

    public static String getActivityDir() {
        return fileConst.activityDir;
    }

    public static String getActivitiImg() {
        return fileConst.activitiImg;
    }
}
